<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('车辆下发列表')" />
</head>
<body>
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>车辆名称：</label>
                                <input type="text" name="carName"/>
                            </li>
                            <!--<li>
                                <label>车辆类型：</label>
                                <select name="carType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>-->
                            <li>
                                车辆类型：<select name="carType" th:with="type=${@dict.getType('zhmk_car_types')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>联系电话：</label>
                                <input type="text" name="phonenumber"/>
                            </li>
                            <li>
                                <label>车辆照片：</label>
                                <input type="text" name="avatar"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "zhmk/carsend";
        $(function() {
            var options = {
                url: prefix + "/list",
                modalName: "车辆下发",
                columns: [{
                    field: 'carsendId',
                    title: '车辆下发ID',
                    visible: false
                },
                {
                    field: 'carName',
                    title: '车辆名称'
                },
                {
                    field: 'carType',
                    title: '车辆类型'
                },
                {
                    field: 'phonenumber',
                    title: '联系电话'
                },
                {
                    field: 'avatar',
                    title: '车辆照片'
                },
                {
                    field: 'remark',
                    title: '备注'
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>